package com.vpclub.dao;

import com.vpclub.bean.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

/**
 * @author : leimingchao
 * @version V1.0
 * @Project: springdemo
 * @Package com.vpclub.bean.dao
 * @Description: TODO
 * @date Date : 2021年06月06日 15:41
 */
@Repository
public class EmployeeDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    public void saveEmployee(Employee employee) {
        String sql = "insert into employee(emp_name,salary) values(?,?)";
        jdbcTemplate.update(sql,employee.getEmpName(),employee.getSalary());
    }
}
